package com.qhnu.zxjx.exception;

import com.qhnu.zxjx.enums.ICodeConfig;
import com.qhnu.zxjx.enums.SystemCodeEnum;
import lombok.Data;

/**
 * @description: 参数异常类
 * @author: panpei
 * @date: 2019/11/13 13:38
 * @version: 1.0
 **/
@Data
public class ValidatorException extends RuntimeException {
	private int code = SystemCodeEnum.ERROR_VALIDATOR_PARAMETER.getCode();

	public ValidatorException() {
		super();
	}

	public ValidatorException(int code, String message) {
		super(message);
		this.code = code;
	}

	public ValidatorException(ICodeConfig object) {
		super(object.getMessage());
		this.code = object.getCode();
	}
}
